package com.ruoyi.business.service.wecom;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.business.domain.vo.UserChatGroupStatisticVO;
import com.ruoyi.business.domain.vo.wecom.admin.RecentActiveCustomerFollowerVO;
import com.ruoyi.business.domain.vo.wecom.admin.RecentActiveCustomerVO;
import com.ruoyi.business.domain.vo.wecom.admin.RecentActiveGroupVO;
import com.ruoyi.business.domain.vo.wecom.admin.TbWecomMsgArchiveVO;
import com.ruoyi.business.domain.wecom.TbWecomMsgArchive;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.core.page.TableDataInfo;
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;

/**
 * <p>
 * 企业微信会话存档表 服务类
 * </p>
 *
 * @author
 * @since 2023-XX-XX
 */
public interface ITbWecomMsgArchiveService extends IService<TbWecomMsgArchive> {
    // 参数条件分页查询会话消息
    TableDataInfo<TbWecomMsgArchiveVO> sysPage(String fromUserId, String toUserId, String chatId, Long beginTime, Long endTime, PageQuery pageQuery);

    // 会话消息存档
    void handleMsgAuditNotifyEvent(WxCpXmlMessage message);

    // 最近活跃的群聊列表-分页查询
    TableDataInfo<RecentActiveGroupVO> sysRecentActiveGroups(String chatName, String externalUserid, Long beginTime, Long endTime, PageQuery pageQuery);

    // 客户检索 最近活跃的客户列表-分页查询
    TableDataInfo<RecentActiveCustomerVO> sysRecentActiveCustomers(String name, Long beginTime, Long endTime, PageQuery pageQuery);

    // 群聊检索-最近活跃的客户客服列表-分页查询
    TableDataInfo<RecentActiveCustomerFollowerVO> selectRecentServicesByCustomerId(String externalUserid, String name, Long beginTime, Long endTime, PageQuery pageQuery);

    // 指定用户群活跃统计
    TableDataInfo<UserChatGroupStatisticVO> getCustomerGroupActiveStatsPage(Long userId, Long beginTime, Long endTime, PageQuery pageQuery);


}
